Skip to content

Conversation

@robch
Copy link
Owner

@robch robch commented Jan 11, 2026

Changes

Script Refactoring (Remove Duplication)

  • Problem: here-impl.sh and setup-debug-path.sh contained ~36 lines of duplicated code (DEBUG_PATHS array, PATH checking logic, PATH building logic)
  • Solution: Made setup-debug-path.sh safely sourceable so here-impl.sh can reuse its functions
  • Benefits:
    • Single source of truth for debug PATH configuration
    • 22 fewer total lines of code
    • Zero duplication
    • Improved maintainability

Changes Made

  1. setup-debug-path.sh: Added sourcing detection, conditional set -e, conditional main() execution
  2. here-impl.sh: Removed duplicated setup_debug_path() function, now sources and calls functions from setup-debug-path.sh
  3. here.sh: Fixed permissions (755)

Help Documentation Updates

  • Updated provider.txt and settings.txt with improved Azure and Anthropic configuration examples

Testing

  • ✅ Verified identical behavior before/after refactoring
  • ✅ Tested source ./here.sh switches to debug builds correctly
  • ✅ Tested "already configured" detection works
  • ✅ Verified standalone setup-debug-path.sh still functions independently

@robch robch merged commit 352377e into master Jan 11, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants